package com.atos.optical.service.impl;

import com.atos.optical.common.BaseServiceImpl;
import com.atos.optical.mapper.SysOrderInfoMapper;
import com.atos.optical.model.po.SysOrderInfo;
import com.atos.optical.model.query.SysOrderInfoQuery;
import com.atos.optical.service.SysOrderInfoService;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wanghra
 * @version 1.0
 * @description
 * @date 2025/8/15
 */
@Slf4j
@Service
public class SysOrderInfoServiceImpl extends BaseServiceImpl<SysOrderInfoMapper,
        SysOrderInfo> implements SysOrderInfoService {
    @Autowired
    private SysOrderInfoMapper mapper;

    @Override
    public SysOrderInfoQuery pageByQuery(SysOrderInfoQuery query) {
        query.setOrders(OrderItem.descs("CREATE_TIME", "MODIFY_TIME"));
        mapper.pageByQuery(query);
        return query;
    }
}
